#version 130

varying vec3 outNormal;
varying vec2 outUV;
varying vec3 position;
varying vec3 worldVertexPosition;
varying vec3 worldNormalDirection;
 
uniform samplerCube cubeMap;
uniform vec3 cameraPosition;
 
void main()
{

		vec3 incident = normalize(worldVertexPosition - cameraPosition);
		vec3 normal = normalize(worldNormalDirection);
		//vec3 reflected = reflect(incident, normal);
		//vec3 reflected = normalize(reflect(incident, normal));
		
		// Refraccion
		vec3 reflected = normalize(refract(incident, normal, 1.1));
		
		vec4 colorInvisible = vec4(0.0,0.0,0.0,0.2);
		
		gl_FragColor = colorInvisible;
		//gl_FragColor = vec4(0.0,1.0,0.0,1.0);

}
 